{% extends "blog/layout.html" %} 
{% block posts %}

{% for post in posts %}
<div class='article' itemscope itemtype="http://schema.org/BlogPosting">

    <div class="header">
        <div itemprop="name" class='title'>{{post.title}}</div>
        <div class='information'>пост написан и отправлен в печать <span itemprop="dateCreated">{{post.createdAt|date:"Y-m-d"}}</span> примерно в <span title='со времени публикации прошло {{post.createdAt|timesince}}'>{{post.createdAt|date:"H:i"}}</span>

            <div class='social'>
                <a target="_blank" href="http://vkontakte.ru/share.php?url=http://www.mindcollapse.com{% url blogs.views.id id=post.id %}" class="vk" title="Share in Vkontakte"></a>
                <a target="_blank" href="http://www.facebook.com/sharer.php?u=http://www.mindcollapse.com{% url blogs.views.id id=post.id %}" class="fb" title="Share in Facebook"></a>
                <a target="_blank" href="http://twitter.com/share?url=http://www.mindcollapse.com{% url blogs.views.id id=post.id %}&text={{post.title|urlencode}}&via=middlesizetit" class="tw" title="Share in Twitter"></a>

                <g:plusone href="http://www.mindcollapse.com{% url blogs.views.id id=post.id %}" size="small" annotation="none"></g:plusone>
                
            </div>

            <div style='clear:both'></div>
        </div>
    </div>

	<div itemprop="description" class='description'>
        {{post.text|safe}}
    </div>
	<div class='footer'>теглайн: {% for tag in post.tags.all %}<a class='tag' href='{% url blogs.views.tag tag=tag.slug %}'>{{tag.name}}</a>&nbsp;{% empty %}доисторический безтеговый пост{% endfor %}| <a itemprop="url" href="{% url blogs.views.id id=post.id %}">постоянная ссылка</a></div>
</div>
{% endfor %}

{% if pagination.num_pages > 1 %}
<div class='pagination_link next {% if not current_page.has_next %}grayed{% endif %}'>{% if not current_page.has_next %}&rarr; next page{% else %}<a title='ctrl &rarr;' id='nextlink' href='{{pagination_url}}{{current_page.next_page_number}}/'>&rarr; next page</a>{% endif %}</div>
<div class='pagination_link prev {% if not current_page.has_previous %}grayed{% endif %}'>{% if not current_page.has_previous %}&larr; prev page{% else %}<a title='&larr; ctrl' id='prevlink' href='{{pagination_url}}{{current_page.previous_page_number}}/'>&larr; prev page</a>{% endif %}</div>
{% endif %}

{% endblock %}